﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using onHaj.Code.BusinessLogic;



namespace WebDesignExpressions
{
    public partial class Contact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {

            onSoftMail mail = new onSoftMail(HttpContext.Current);
            var messageParameters = new Dictionary<string, string>();
            messageParameters.Add("{Name}", dfsName.Text);
            messageParameters.Add("{Company}", dfsCompany.Text);
            messageParameters.Add("{Phone}", dfsPhone.Text);
            messageParameters.Add("{E-mail}", dfsEmail.Text);
            messageParameters.Add("{Country}", Countrylist.Text);
            messageParameters.Add("{State}", StateList.Text);
            messageParameters.Add("{Comments}", dfsComments.Text);





            mail.SendMail(@"html/ThankYou.htm", dfsEmail.Text, "Thank You", messageParameters);
            mail.SendMail(@"html/ContactNotification.html", "web@bpwe.net", "Action required", messageParameters);
            Response.Redirect("Thank-You.aspx");

            // bp.BusinessLogic.Mail mail = new bp.BusinessLogic.Mail();
          //  //Confirmation page that will be sent to the user
          // string msg = mail.SendMail(Server.MapPath("ContactConfirmation.html"), "mail.bpwe.net", "web@bpwe.net", dfsEmail.Text,
          //"root@bpwe.net", "Nv4c7df7", "Thank You For Contacting Web Design Expressions", dfsName.Text, "",
          //"", Guid.NewGuid(), "", "", "");



          //  //notification page
          // mail.SendMail(Server.MapPath("ContactNotification.html"), "mail.bpwe.net", dfsEmail.Text, "web@bpwe.net",
          //"root@bpwe.net", "Nv4c7df7", "Contact Notification", "Web Design Expressions", "",


          //dfsName.Text + "<br/>" + "Company : " + dfsCompany.Text + "<br/>" + "Phone Number:" + dfsPhone.Text + "<br/>" + "Email Address : " + dfsEmail.Text + "<br/>" + "Country : " + Countrylist.Text + "<br/>" + "State : " + StateList.Text + "<br/>" + "Message : " + dfsComments.Text, Guid.NewGuid(), "", "", "");

          Response.Redirect("Thank-You.aspx");
        }
    }
}